<? $c = sizeof($menu) ?>
<? if ($c > 0):?>
<? $c-- ?>
<ul>
    <? for($i = 0; $i <= $c; $i++): ?>
            <? $cur = in_array($menu[$i], $active) ?>
            <? $class = ''?>
        <li>
            <a href="<?= $menu[$i]->url ?>" class="<?= $class.($cur)?'current':'' ?>">
                <?= $menu[$i]->title ?>
            </a>
<? 
            $this->widget('DrawMenu', array(
                    'template' => 'SubMenu',
                    'menu' => 'admin',
                    'parent' => $menu[$i]->id 
            )); 
?>
        </li>
    <? endfor ?>
</ul>
<? endif ?>
